package com.shunli.cterminal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shunli.cterminal.entity.SystemOrderAdTemp;
import com.shunli.cterminal.model.req.MyOrderQueryReq;
import com.shunli.cterminal.model.res.MyOrderInfoVO;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @className: SystemOrderAdTempMapper
 * @description: TODO
 * @author: DAIYALU
 * @date: 2024/7/3
 * @version: 1.0
 */
public interface SystemOrderAdTempMapper extends BaseMapper<SystemOrderAdTemp> {

    Long queryTemplateIdBySkuId(@Param("skuId") String skuId);

    int updateOrderRedBagAmount(@Param("orderNo") String orderNo, @Param("redBagAmount") BigDecimal redBagAmount);

    IPage<MyOrderInfoVO> queryMyOrderList(@Param("req") MyOrderQueryReq req, Page<MyOrderInfoVO> page);

    List<SystemOrderAdTemp> queryTempByOrderNo(@Param("orderNo") String orderNo);
}
